#include<iostream>
#include<cstring>
using namespace std;

int main()
{
    FILE* f = fopen("./tmp.txt","w");
    const char* str = "linux so easy";
    fwrite(str,sizeof(char),strlen(str),f);
    fclose(f);

    f = fopen("./tmp.txt","r");
    char buffer[100];
    fread(buffer,sizeof(char),sizeof(buffer),f);
    cout << buffer << endl;
    fclose(f);

    return 0;
}